package com.ctshk.sapp.order.bus.controller;


import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.order.bus.service.IBusOrderCollectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 巴士收款明细 前端控制器
 * </p>
 *
 * @author 彭柳霖
 * @since 2021-02-24
 */
@Api(value="订单中心-订单再次确认收款", tags="订单中心-订单再次确认收款")
@RestController
@RequestMapping("/bus-order-collection")
public class BusOrderCollectionController extends BaseController {

    @DubboReference
    IBusOrderCollectionService busOrderCollectionService;


    @ApiOperation(value = "巴士票-订单操作-再次确认收款", notes = "巴士票-订单操作-再次确认收款")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.UPDATE, operTitle = "巴士票-订单中心-再次确认收款", operDesc = "巴士票-订单中心-再次确认收款")
    @PostMapping("/reconfirm/{id}")
    public Result reconfirm(@PathVariable("id") Long id) {
        Long userId = getCurrentUser(getRequest()).getId();
        return busOrderCollectionService.reconfirm(id, userId);
    }

}
